3.47 \(\int \frac{1+2 x^2}{1+4 x^4} \, dx\)

Optimal. Leaf size=21 \[ \frac{1}{2} \tan ^{-1}(2 x+1)-\frac{1}{2} \tan ^{-1}(1-2 x) \]

[Out]

-ArcTan[1 - 2*x]/2 + ArcTan[1 + 2*x]/2

________________________________________________________________________________________

Rubi [A]  time = 0.0129114, antiderivative size = 21, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 3, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.176, Rules used = {1162, 617, 204} \[ \frac{1}{2} \tan ^{-1}(2 x+1)-\frac{1}{2} \tan ^{-1}(1-2 x) \]

Antiderivative was successfully verified.

[In]

Int[(1 + 2*x^2)/(1 + 4*x^4),x]

[Out]

-ArcTan[1 - 2*x]/2 + ArcTan[1 + 2*x]/2

Rule 1162

Int[((d_) + (e_.)*(x_)^2)/((a_) + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[(2*d)/e, 2]}, Dist[e/(2*c), Int[1/S
imp[d/e + q*x + x^2, x], x], x] + Dist[e/(2*c), Int[1/Simp[d/e - q*x + x^2, x], x], x]] /; FreeQ[{a, c, d, e},
 x] && EqQ[c*d^2 - a*e^2, 0] && PosQ[d*e]

Rule 617

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*Simplify[(a*c)/b^2]}, Dist[-2/b, Sub
st[Int[1/(q - x^2), x], x, 1 + (2*c*x)/b], x] /; RationalQ[q] && (EqQ[q^2, 1] ||  !RationalQ[b^2 - 4*a*c])] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{1+2 x^2}{1+4 x^4} \, dx &=\frac{1}{4} \int \frac{1}{\frac{1}{2}-x+x^2} \, dx+\frac{1}{4} \int \frac{1}{\frac{1}{2}+x+x^2} \, dx\\ &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,1-2 x\right )-\frac{1}{2} \operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,1+2 x\right )\\ &=-\frac{1}{2} \tan ^{-1}(1-2 x)+\frac{1}{2} \tan ^{-1}(1+2 x)\\ \end{align*}

Mathematica [A]  time = 0.0061624, size = 17, normalized size = 0.81 \[ -\frac{1}{2} \tan ^{-1}\left (\frac{2 x}{2 x^2-1}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(1 + 2*x^2)/(1 + 4*x^4),x]

[Out]

-ArcTan[(2*x)/(-1 + 2*x^2)]/2

________________________________________________________________________________________

Maple [A]  time = 0.043, size = 18, normalized size = 0.9 \begin{align*}{\frac{\arctan \left ( 2\,x-1 \right ) }{2}}+{\frac{\arctan \left ( 1+2\,x \right ) }{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x^2+1)/(4*x^4+1),x)

[Out]

1/2*arctan(2*x-1)+1/2*arctan(1+2*x)

________________________________________________________________________________________

Maxima [A]  time = 1.45928, size = 23, normalized size = 1.1 \begin{align*} \frac{1}{2} \, \arctan \left (2 \, x + 1\right ) + \frac{1}{2} \, \arctan \left (2 \, x - 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2+1)/(4*x^4+1),x, algorithm="maxima")

[Out]

1/2*arctan(2*x + 1) + 1/2*arctan(2*x - 1)

________________________________________________________________________________________

Fricas [A]  time = 1.30594, size = 53, normalized size = 2.52 \begin{align*} \frac{1}{2} \, \arctan \left (2 \, x^{3} + x\right ) + \frac{1}{2} \, \arctan \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2+1)/(4*x^4+1),x, algorithm="fricas")

[Out]

1/2*arctan(2*x^3 + x) + 1/2*arctan(x)

________________________________________________________________________________________

Sympy [A]  time = 0.095898, size = 14, normalized size = 0.67 \begin{align*} \frac{\operatorname{atan}{\left (x \right )}}{2} + \frac{\operatorname{atan}{\left (2 x^{3} + x \right )}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x**2+1)/(4*x**4+1),x)

[Out]

atan(x)/2 + atan(2*x**3 + x)/2

________________________________________________________________________________________

Giac [B]  time = 1.11962, size = 62, normalized size = 2.95 \begin{align*} \frac{1}{2} \, \arctan \left (2 \, \sqrt{2} \left (\frac{1}{4}\right )^{\frac{3}{4}}{\left (2 \, x + \sqrt{2} \left (\frac{1}{4}\right )^{\frac{1}{4}}\right )}\right ) + \frac{1}{2} \, \arctan \left (2 \, \sqrt{2} \left (\frac{1}{4}\right )^{\frac{3}{4}}{\left (2 \, x - \sqrt{2} \left (\frac{1}{4}\right )^{\frac{1}{4}}\right )}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2+1)/(4*x^4+1),x, algorithm="giac")

[Out]

1/2*arctan(2*sqrt(2)*(1/4)^(3/4)*(2*x + sqrt(2)*(1/4)^(1/4))) + 1/2*arctan(2*sqrt(2)*(1/4)^(3/4)*(2*x - sqrt(2
)*(1/4)^(1/4)))